﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using KKCai.App.DAL.DaoImpl;

public partial class admin_type_list : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ddlType.DataSource = new TypeDao().Get(1).Children;
            ddlType.DataTextField = "Name";
            ddlType.DataValueField = "ID";
            ddlType.DataBind();

            rpt.DataSource = ddlType.DataSource;
            rpt.DataBind();
        }
    }
    protected void ddlType_SelectedIndexChanged(object sender, EventArgs e)
    {
        rpt.DataSource = new TypeDao().Get(Convert.ToInt32(ddlType.SelectedValue)).Children;
        rpt.DataBind();
    }
}
